package jp.co.sn.mml.pojo.tmstkgrpd;

import jp.co.sn.mml.pojo.tmsst.Tmsst;
import jp.co.sn.mml.pojo.tmstk.Tmstk;

public class TmstkgrpdId implements java.io.Serializable { 

	//コード区分
	private String cdKbn;
	//コード
	private Tmsst code;
	//検査小分類
	private String SBnr;
	//薬剤セットコード
	private String yzSetCd;
	//推定菌グループコード
	private String stkGrpCd;
	//推定菌コード
	private Tmstk stkCd;

	/** default constructor */
	public TmstkgrpdId(){

	}

	/** full constructor */
	public TmstkgrpdId(String cdKbn,Tmsst code,String SBnr
			,String yzSetCd,String stkGrpCd,Tmstk stkCd){
		this.cdKbn = cdKbn;
		this.code = code;
		this.SBnr = SBnr;
		this.yzSetCd = yzSetCd;
		this.stkGrpCd = stkGrpCd;
		this.stkCd = stkCd;
	}

	//Property accessors
	public String getCdKbn(){
		return this.cdKbn;
	}

	public void setCdKbn(String cdKbn){
		this.cdKbn=cdKbn;
	}

	public Tmsst getCode(){
		return this.code;
	}

	public void setCode(Tmsst code){
		this.code=code;
	}

	public String getSBnr(){
		return this.SBnr;
	}

	public void setSBnr(String SBnr){
		this.SBnr=SBnr;
	}

	public String getYzSetCd(){
		return this.yzSetCd;
	}

	public void setYzSetCd(String yzSetCd){
		this.yzSetCd=yzSetCd;
	}

	public String getStkGrpCd(){
		return this.stkGrpCd;
	}

	public void setStkGrpCd(String stkGrpCd){
		this.stkGrpCd=stkGrpCd;
	}

	public Tmstk getStkCd(){
		return this.stkCd;
	}

	public void setStkCd(Tmstk stkCd){
		this.stkCd=stkCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmstkgrpdId))
			return false;

		TmstkgrpdId castOther = (TmstkgrpdId) other;

		return ((this.getCdKbn() ==  castOther.getCdKbn())
				||(this.getCdKbn()!=null && castOther.getCdKbn() !=null 
					&& castOther.getCdKbn() !=null 
					&& this.getCdKbn().equals(castOther.getCdKbn())))
			&& ((this.getCode() ==  castOther.getCode())
				||(this.getCode()!=null && castOther.getCode() !=null 
					&& castOther.getCode() !=null 
					&& this.getCode().equals(castOther.getCode())))
			&& ((this.getSBnr() ==  castOther.getSBnr())
				||(this.getSBnr()!=null && castOther.getSBnr() !=null 
					&& castOther.getSBnr() !=null 
					&& this.getSBnr().equals(castOther.getSBnr())))
			&& ((this.getYzSetCd() ==  castOther.getYzSetCd())
				||(this.getYzSetCd()!=null && castOther.getYzSetCd() !=null 
					&& castOther.getYzSetCd() !=null 
					&& this.getYzSetCd().equals(castOther.getYzSetCd())))
			&& ((this.getStkGrpCd() ==  castOther.getStkGrpCd())
				||(this.getStkGrpCd()!=null && castOther.getStkGrpCd() !=null 
					&& castOther.getStkGrpCd() !=null 
					&& this.getStkGrpCd().equals(castOther.getStkGrpCd())))
			&& ((this.getStkCd() ==  castOther.getStkCd())
				||(this.getStkCd()!=null && castOther.getStkCd() !=null 
					&& castOther.getStkCd() !=null 
					&& this.getStkCd().equals(castOther.getStkCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCdKbn() == null ? 0 : this.getCdKbn().hashCode());
		result = 37 * result
				+ (getCode() == null ? 0 : this.getCode().hashCode());
		result = 37 * result
				+ (getSBnr() == null ? 0 : this.getSBnr().hashCode());
		result = 37 * result
				+ (getYzSetCd() == null ? 0 : this.getYzSetCd().hashCode());
		result = 37 * result
				+ (getStkGrpCd() == null ? 0 : this.getStkGrpCd().hashCode());
		result = 37 * result
				+ (getStkCd() == null ? 0 : this.getStkCd().hashCode());
		return result;
	}

}